import request from '@/utils/request'


export function facilitiesManagementList(data) { //表格查询
  return request({
    url: '/project-quality/api/facility/page',
    method: 'POST',
    data
  })
}
export function facilitiesManagementDetail(id) { //单条查询
  return request({
    url: '/project-quality/api/facility/get/'+id,
    method: 'GET',
  })
}
//原 put
export function facilitiesManagementEdit(data) { //编辑、新增
  return request({
    url: '/project-quality/api/facility/put/update',
    method: 'post',
    data
  })
}

export function facilitiesTableList(data) { //分级设施管理查询
  return request({
    url: '/project-quality/api/facility/level/page',
    method: 'POST',
    data
  })
}
export function facilitiesTableListOld(data) { //老旧设施管理查询
  return request({
    url: '/project-quality/api/facility/old/page',
    method: 'POST',
    data
  })
}

export function facilitiesTableDetailOld(id) { //设施查询
  return request({
    url: '/project-quality/api/facility/query/'+id,
    method: 'GET',
  })
}

export function facilitiesTableExport(data) { //设备导出
    return request({
        url: '/project-quality/api/facility/export',
        responseType: 'arraybuffer',
        method: 'POST',
        data,
    })
}

export function facilitiesTableStatus(data) { //改变是否展示状态
    return request({
        url: '/project-quality/api/facility/put/update/status',
        method: 'POST',
        data,
    })
}
